package com.mall.user.api;

import com.mall.user.entity.param.UserAddParam;
import com.mall.user.entity.param.UserEditParam;
import com.mall.user.entity.vo.UserVO;
import com.mall.user.entity.vo.UserWithRoleInfoVO;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author wuyijie
 * @description: TODO 用户User API定义
 * @date 2021/6/20 18:33
 */
public interface UserApi {

    int add(@RequestBody UserAddParam userAddParam);

    int deleteById(@RequestParam int id);

    int edit(@RequestBody UserEditParam userEditParam);

    UserVO queryById(@RequestParam int id);

    UserVO queryByUsername(@RequestParam String username);

    UserWithRoleInfoVO queryUserWithRoleVOByUsername(@RequestParam String username);

    UserVO queryByUsernameAndPassword(@RequestParam String username,@RequestParam String password);

}
